<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/

/*Route::get('/', function () {
    return view('welcome');
});
*/
Route::get('GitAporia',function()
{
    return view('GitAporia');
});

Route::get('LaravelAporia',function()
{
    return view('LaravelAporia');
});

Route::get('BlobAporia',function()
{
    return view('BlobAporia');
});

Route::get('/',function()
{
//    $url=route('myname');
//    $redirect=redirect()->route('myname');
   // return $redirect;
    return view('home');
});
Route::get('getImageData/{id}','TestController@getImageData');


Route::get('uploadimage',function()
{
//    $url=route('myname');
//    $redirect=redirect()->route('myname');
    // return $redirect;
    return view('uploadImage');
});

Route::get('dispimg','TestController@showImages');

Route::post('uploadimage','TestController@postImage');

Route::any('home',function()
{
//    $url=route('myname');
//    $redirect=redirect()->route('myname');
    // return $redirect;
    return view('home');
});

Route::get('/wdm/jackwong',['as'=>'myname',function()
{

    return '你好,myname!';
}]);

Route::get('/getfile',['as'=>'getfile',function()
{

    return response()->download('robots.txt','实验.txt');
}]);


Route::any('index',['uses'=>"TestController@index",'as'=>'myindex']);
Route::any('list',['uses'=>"DbController@index",'as'=>'mylist']);
Route::any('show',['uses'=>"TestController@show",'as'=>'myshow']);

//Route::any('home','TestController@show');

Route::get('auth/login', 'Auth\AuthController@getLogin');
Route::post('auth/login', 'Auth\AuthController@postLogin');
Route::get('auth/logout', 'Auth\AuthController@getLogout');

Route::get('auth/register', 'Auth\AuthController@getRegister');
Route::post('auth/register', 'Auth\AuthController@postRegister');

